package com.lhf.enumfile;

import java.security.PrivateKey;

/**
 * @author 尐痞猫
 * @date2021-06-24 19:47
 */
public enum Status {
    QIYONG(1,"启用"),
    JINYONG(0,"禁用");
    private Integer status;
    private String statusName;

    //必须有一个构造方法
    Status(Integer status,String statusName) {
        this.status=status;
        this.statusName=statusName;
    }
    public String getStatusName() {
        return statusName;
    }

    public Integer getStatus() {
        return status;
    }

    public static String getStatusName(Integer status){
        for (Status c : Status.values()) {
            if (status==c.getStatus()){
                return c.getStatusName();
            }
        }
        return null;
    }


}
